export default{
    namespaced:true,
    state:{
        //模拟数据
        history:[
            {
                path:'/main/dataAnalysis',
                meta:{name:'dataAnalysis'}
            }
        ]
    },
    mutations:{
        addTabs(state,payload){
            const isHash=state.history.some(item=>{
                 return item.path==payload.path
            })
            if(!isHash){
                state.history.push(payload)
            }
            
        },
        removeTabs(state,payload){
            state.history.splice(payload,1)
        }

    }
}